import os
from dotenv import load_dotenv
from masoniteorm.connections import ConnectionResolver
load_dotenv()
DATABASES = {
    "default": "mysql",
    'mysql': {
        'driver': 'mysql',
        'host': os.getenv('MYSQL_DATABASE_HOST'),
        'user': os.getenv('MYSQL_DATABASE_USER'),
        'password': os.getenv('MYSQL_DATABASE_PASSWORD'),
        'database': os.getenv('MYSQL_DATABASE_DATABASE'),
        'port': os.getenv('MYSQL_DATABASE_PORT'),
        'prefix': '',
        'options': {
            'charset': 'utf8mb4',
        },
        'log_queries': True
    },
}

DB = ConnectionResolver().set_connection_details(DATABASES)
